1. Field of the Invention
The present invention relates to an image processing apparatus for performing at least edge enhancement processing to an image, and an image processing program and an image processing method thereof.
2. Description of the Related Art
Some digital still cameras have an image processing unit for realizing a function of an image processing apparatus by performing various image processing to generated images. Such an image processing unit performs white balance adjustment, interpolation processing, gamma processing, edge enhancement processing, and the like. In particular, the edge enhancement processing effectively improves image quality and the like. On the other hand, however, edge enhancement processing has disadvantages such as increases in noise and chromatic aberration.
Conventionally, therefore, edge enhancement processing has been performed using a predetermined fixed edge enhancement coefficient with factors having effects on edge enhancement processing (for example, sensitivity and exposure time set at generation of an image, a gradation translation characteristic for the image, and the like) taken into consideration, or edge enhancement processing has been performed using an edge enhancement coefficient according to a degree of enhancement degree set by a user.
However, the fixed edge enhancement coefficient and the edge enhancement coefficient according to the enhancement degree set by the user are set for use in typical setting conditions at the time of photographing. Accordingly, when values of any of the factors having effects on the edge enhancement processing do not fall within values used in the typical setting conditions, it is difficult to prevent noise and chromatic aberration from getting worse.
For example, in performing the edge enhancement processing on an image which is captured with a higher sensitivity, the image has more noise therein than an image captured with a normal sensitivity, therefore, increasing noise cannot be prevented even using the aforesaid fixed edge enhancement coefficient.
Further, when an image has a low saturation, the conventional image processing unit of the digital still camera performs color reproduction processing on the image such that the image has a more vivid color reproduction characteristic than an image having a normal saturation, which results in amplifying chromatic aberration. Therefore, even if the aforesaid fixed edge enhancement coefficient is used for an image with an amplified chromatic aberration, it is hard to prevent chromatic aberration from getting worse.
Furthermore, the fixed edge enhancement coefficient is determined without the presence or absence of a flash from a flash device when an image is captured taken into account so that it is difficult to prevent increases in noise and chromatic aberration depending on the presence or absence of the flash of the flash device.
The same problems arise when the edge enhancement processing is performed using the edge enhancement coefficients according to the enhancement degree set by the user, and when values of any of the factors having effects on the edge enhancement processing do not fall within values used in the typical setting conditions, because the coefficients are determined according to the degree of edge enhancement used in the typical setting conditions.
In addition, the image processing unit of the conventional digital still camera performs processing of multiplying a white balance coefficient for white balance adjustment, noise included in inputted image data may be also amplified. Further, the multiplying processing is made also for gamma processing and edge enhancement processing, which increase noise in some cases. In particular, increases in the noise arising from the edge enhancement processing are larger than from other image processings. Note that at the time of performing interpolation and smoothing processings noise may be cancelled and reduced due to averaging done in the process.
Further, image processings as described above are independently performed in the conventional digital still camera. Accordingly, the coefficients used for the respective image processing are not correlated with each other, and because of this, such problems occur as noise is increased in the process of the white balance adjustment, and the increased noise is further increased by performing subsequent edge enhancement processing without the increase taken into account.
Some conventional digital still cameras determine a color correction coefficient according to color temperature of a subject or select a tone curve used for gamma processing according to contrast of the subject, but even these cameras may increase noise because the edge enhancement processing is independently performed.